package com.grace.mapper;

import com.grace.entity.Traveller;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TravellerMapper {

/*
 private String id;
    private String name;
    private String sex;
    private String phoneNum;
    private Integer credentialsType; //证件类型 0身份证 1护照 2军官证
    private String credentialsTypeStr;
    private String credentialsType;
    private Integer travellerType; //旅客类型(人群) 0 成人 1 儿童
    private String travellerTypeStr;
 */
    @Select("select * from traveller where id in (select travellerId from order_traveller where orderId=#{ordersId})")
    //@Select("select id,name,sex,phoneNum,credentialsType,credentialsType,travellerType from traveller where id in (select travellerId from order_traveller where orderId=#{ordersId})")
    List<Traveller> findByOrdersId(String ordersId);
}
